{"componentChunkName":"component---src-templates-blog-post-js","path":"/development/[netlify]-배포-오류-cannot-find-module-fs-promises/","result":{"data":{"site":{"siteMetadata":{"title":"Honey bee","author":"bee","siteUrl":"https://honey-bee.netlify.app","comment":{"disqusShortName":"https-honey-bee-netlify-app","utterances":"shinners1/my-blog"},"sponsor":{"buyMeACoffeeId":"shinners1"}}},"markdownRemark":{"id":"2d2316ee-d6fc-5fbc-964e-9f7a6160b261","excerpt":"netlify 에서 배포 중 아래와 같이 에러가 시작되며 배포가 fail을 반복하고 있었음. netlify 의 기본 node 버전은 12버전인듯 한데 이때문에 아래와 같은 오류가 시작됨.  해결 : 프로젝트 최상단 경로에 .nvmrc 파일을 생성하고 그 안에 버전 명을 기재한 후에 배포함    참조 https://answers.netlify.com/t/build-error-in-remix-app-with-prisma-seed-file/52594/3 https://medium.com/@su_bak…","html":"<p>netlify 에서 배포 중 아래와 같이 에러가 시작되며 배포가 fail을 반복하고 있었음.<br>\nnetlify 의 기본 node 버전은 12버전인듯 한데 이때문에 아래와 같은 오류가 시작됨.</p>\n<p><code class=\"language-text\">Cannot find module ‘fs/promises’</code></p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">2:43:42 PM: ────────────────────────────────────────────────────────────────\n2:43:42 PM:   1. Build command from Netlify app                             \n2:43:42 PM: ────────────────────────────────────────────────────────────────\n2:43:42 PM: ​\n2:43:42 PM: $ gatsby build\n2:43:45 PM: success open and validate gatsby-configs - 0.078s\n2:43:47 PM: error Error in \"/opt/build/repo/node_modules/gatsby-plugin-robots-txt/gatsby-node.js\": Cannot find module 'fs/promises'\n2:43:47 PM: Require stack:\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby-plugin-robots-txt/gatsby-node.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/resolve-module-exports.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/load.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/index.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/dist/services/initialize.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/dist/services/index.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/dist/bootstrap/index.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/dist/commands/build.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby-cli/lib/create-cli.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby-cli/lib/index.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/dist/bin/gatsby.js\n2:43:47 PM: - /opt/build/repo/node_modules/gatsby/cli.js\n2:43:47 PM: \n2:43:47 PM: \n2:43:47 PM:   Error: Cannot find module 'fs/promises'\n2:43:47 PM:   Require stack:\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby-plugin-robots-txt/gatsby-node.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby/dist/bootstrap/resolve-module-exports.js  - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/validate.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/load.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby/dist/bootstrap/load-plugins/index.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby/dist/services/initialize.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby/dist/services/index.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby/dist/bootstrap/index.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby/dist/commands/build.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby-cli/lib/create-cli.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby-cli/lib/index.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby/dist/bin/gatsby.js\n2:43:47 PM:   - /opt/build/repo/node_modules/gatsby/cli.js</code></pre></div>\n<h3 id=\"해결--프로젝트-최상단-경로에-nvmrc-파일을-생성하고-그-안에-버전-명을-기재한-후에-배포함\" style=\"position:relative;\"><a href=\"#%ED%95%B4%EA%B2%B0--%ED%94%84%EB%A1%9C%EC%A0%9D%ED%8A%B8-%EC%B5%9C%EC%83%81%EB%8B%A8-%EA%B2%BD%EB%A1%9C%EC%97%90-nvmrc-%ED%8C%8C%EC%9D%BC%EC%9D%84-%EC%83%9D%EC%84%B1%ED%95%98%EA%B3%A0-%EA%B7%B8-%EC%95%88%EC%97%90-%EB%B2%84%EC%A0%84-%EB%AA%85%EC%9D%84-%EA%B8%B0%EC%9E%AC%ED%95%9C-%ED%9B%84%EC%97%90-%EB%B0%B0%ED%8F%AC%ED%95%A8\" aria-label=\"해결  프로젝트 최상단 경로에 nvmrc 파일을 생성하고 그 안에 버전 명을 기재한 후에 배포함 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>해결 : 프로젝트 최상단 경로에 .nvmrc 파일을 생성하고 그 안에 버전 명을 기재한 후에 배포함</h3>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 525px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 44.99999999999999%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAJCAIAAAC9o5sfAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAoElEQVQoz8WOSw7CMAxEc5V8SJWfIyMWCdAChQULQIj7HwY3qQCxIiueRvZYyjhmw3g6X2+X+2M97PO2V2pR0L+IrVLe7A79eARcOohSKiGlEIoMqVL9lwhmjLHWeu8RIyKSgQgxRmvMdIDWn5V61+k6EozeYSHlnFICCM55APCB9ng3MZtXrYZ+ZaFAAxeCcy5bmMO0jM5QjbzDqp3/hZ9nE1O9/CmT/gAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"picture 1\"\n        title=\"picture 1\"\n        src=\"/static/e2b1e46e0f30110436a68fc09bd12867/52211/273d451eb3f6069fd7773c5b2ae2b820a70504451228bf8a8b61ca1702fa3e24.png\"\n        srcset=\"/static/e2b1e46e0f30110436a68fc09bd12867/5a46d/273d451eb3f6069fd7773c5b2ae2b820a70504451228bf8a8b61ca1702fa3e24.png 300w,\n/static/e2b1e46e0f30110436a68fc09bd12867/52211/273d451eb3f6069fd7773c5b2ae2b820a70504451228bf8a8b61ca1702fa3e24.png 525w\"\n        sizes=\"(max-width: 525px) 100vw, 525px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span>  </p>\n<h3 id=\"참조\" style=\"position:relative;\"><a href=\"#%EC%B0%B8%EC%A1%B0\" aria-label=\"참조 permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>참조</h3>\n<p><a href=\"https://answers.netlify.com/t/build-error-in-remix-app-with-prisma-seed-file/52594/3\">https://answers.netlify.com/t/build-error-in-remix-app-with-prisma-seed-file/52594/3</a></p>\n<p><a href=\"https://medium.com/@su_bak/cannot-find-module-fs-promises-%E1%84%8B%E1%85%A6%E1%84%85%E1%85%A5-%E1%84%92%E1%85%A2%E1%84%80%E1%85%A7%E1%86%AF-%E1%84%87%E1%85%A1%E1%86%BC%E1%84%87%E1%85%A5%E1%86%B8-a344921bd430\">https://medium.com/@su_bak/cannot-find-module-fs-promises-%E1%84%8B%E1%85%A6%E1%84%85%E1%85%A5-%E1%84%92%E1%85%A2%E1%84%80%E1%85%A7%E1%86%AF-%E1%84%87%E1%85%A1%E1%86%BC%E1%84%87%E1%85%A5%E1%86%B8-a344921bd430</a></p>","frontmatter":{"title":"netlify - 배포 오류 Cannot find module fs/promises","date":"June 05, 2022"}}},"pageContext":{"slug":"/development/[netlify]-배포-오류-cannot-find-module-fs-promises/","previous":{"fields":{"slug":"/information security/외우기/"},"frontmatter":{"title":"외우기"}},"next":{"fields":{"slug":"/information security/눈속임-설계-(다크패턴)/"},"frontmatter":{"title":"눈속임 설계 (다크패턴, Dark Pattern)"}}}},"staticQueryHashes":["3128451518","521680639"]}